﻿<UserControl x:Class="Reactor.MiniManager.Views.CoreServicesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Controls="clr-namespace:Reactor.MiniManager.Controls" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <DataGrid ItemsSource="{Binding Services}" AutoGenerateColumns="False">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Image Source="{Binding Mode=OneWay, Path=StatusIndicator}" Margin="3" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Header="Name" Binding="{Binding Mode=OneTime, Path=Name}"></DataGridTextColumn>
                <DataGridTextColumn Header="Version" Binding="{Binding Mode=OneTime, Path=Version}"></DataGridTextColumn>
                <DataGridTemplateColumn Header="Tools">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <Controls:ImageButton ImageSource="/Images/Power.png" Height="20" Command="{Binding Mode=OneTime, Path=ShutdownServiceCommand}" />
                                <Controls:ImageButton ImageSource="/Images/Restart-Small.png" Height="20" Command="{Binding Mode=OneTime, Path=RestartServiceCommand}" />
                                <Controls:ImageButton ImageSource="/Images/Delete1 - Small.png" Height="20" Command="{Binding Mode=OneTime, Path=OrphanServiceCommand}" />
                            </StackPanel>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
